package fr.alesia.deepstack.factory;

import java.util.Date;

import com.google.appengine.api.users.User;

import fr.alesia.deepstack.bean.Player;
import fr.alesia.deepstack.bean.Ranking;
import fr.alesia.deepstack.bean.Tournament;
import fr.alesia.deepstack.bean.jdo.PlayerJdo;
import fr.alesia.deepstack.bean.jdo.RankingJdo;
import fr.alesia.deepstack.bean.jdo.TournamentJdo;

public abstract class BeanFactory {

	private BeanFactory(){}
	
	public static Player createPlayer(String name, User user){
		
		return new PlayerJdo(name, user);
	}
	
	public static Tournament createTournament(Date date){
		
		return new TournamentJdo(date);
	}
	
	public static Ranking createRanking(Player player, Tournament tournament, Integer rank){
		
		return new RankingJdo(player, tournament, rank);
	}
}
